import request from '@/utils/request'
import apis from './'

export function getSubject (parameter) {
  return request({
    url: apis.GetSubject,
    method: 'get',
    params: parameter
  })
}

export function getAddSubject () {
  return request({
    url: apis.AddSubject,
    method: 'get'
  })
}

export function postAddSubject (data) {
  return request({
    url: apis.AddSubject,
    method: 'post',
    data: data
  })
}

export function ocrIdcard (url, side) {
  return request({
    url: `${apis.GetId}?img_url=${url}&side=${side}`,
    method: 'get'
  })
}

export function ocrLicense (url) {
  return request({
    url: `${apis.GetLicense}?img_url=${url}`,
    method: 'get'
  })
}
